package br.com.clinica.supercao.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Transient;


@Entity
@Table(name="FUNCIONARIO",schema="clinica")
@PrimaryKeyJoinColumn(name="SEQ_FUNCIONARIO")
public class Funcionario extends Pessoa {
	private static final long serialVersionUID = 1L;
	private String login;
	private String senha;
	private String confirma;
	
	@Column(name="DESC_LOGIN",length=255,unique=true)
	public String getLogin() {
		return login;
	}
	public void setLogin(String login) {
		this.login = login;
	}
	@Column(name="DESC_SENHA",length=255)
	public String getSenha() {
		return senha;
	}
	public void setSenha(String senha) {
		this.senha = senha;
	}
	public Funcionario(String login, String senha) {
		this.login = login;
		this.senha = senha;
	}
	public Funcionario() {	}
	@Transient
	public String getConfirma() {
		return confirma;
	}
	public void setConfirma(String confirma) {
		this.confirma = confirma;
	}
	@Transient
	public boolean isSenhaConfirmada() {
		return getSenha().equals(getConfirma());
	}
	
}
